/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package SysAguas.dao;

import SysAguas.modelo.Telefone;
import java.util.List;

/**
 *
 * @author Heitor
 */
public class DAOTelefone extends DAOGenerico {


    public List<Telefone> getFoneByHospede(Integer idHospede){

        List<Telefone> toReturn = null ;
        String query ="select tel from Telefone tel join tel.hospede hos" +
                " where hos.id = ?1 ";
        toReturn = getLista(Telefone.class, query, idHospede);
        System.out.println("\n\n"+toReturn.size()+"\n\n");
        return toReturn;

    }
    

}
